<template>
  <div class="container" >
	<!--工具栏-->
	<div class="toolbar" style="float:left;">
		<el-form :inline="true" :model="filters" :size="global.gSize">
		
		</el-form>
	</div>
	

		<div class="gk-layout-main">
			<my-table :data="pageResult.content"  :loading="loading"  >
				<el-table-column :label="$t('action.desc')" width="50" fixed="left"  header-align="center" align="center">
				  <template slot-scope="scope">   {{scope.$index+1}}   </template>
				</el-table-column> 
				<column  prop="title" label="标题"    />
				<column   prop="info" label="内容"   /> 
			
				<column  prop="pubTime" label="时间"   :formatter= "dateFormat" />
			
			</my-table>
		</div>
  </div>
</template>

<script>

import KtButton from "@/views/Core/KtButton"
import { format } from "@/utils/datetime"

	import Column from "@/views/Core/Column"
 
	import MyTable from "@/views/Core/MyTable"
export default {
	components:{
	
			KtButton,
			Column,
			MyTable
	},
	data() {
		return {
		loading:false,
			filters: {
				wmsBanchNo: '',
				isWarning:true
			},
			Items: [], 
			pageResult: {},

			operation: false, // true:新增, false:编辑
			editDialogVisible: false, // 新增编辑界面是否显示
			editLoading: false,					
		}
	},
	
	methods: {
		// 获取分页数据
		findPage: function (data) {
			
			this.$api.login.indexData().then((res) => {
				this.pageResult = {content:res.data}
			}) 
		},
		//加载物料
		findItems: function () {
			this.$api.item.findAll().then((res) => {
				this.Items = res.data			
			})
		},
		//物料名称
		itemFilter:  function (row, column, cellValue, index){
				let key = ""
				let propt = column.property;
				let val = row[column.property];				
				let dict = this.Items;
				for (let i = 0; i < dict.length; i++) {
					if (dict[i].id == val) {
					return dict[i].name;
					}
				}
				return row[column.property]
      	},		
		//国际化
		getKey: function (arg) {
			return this.$t(arg)
		},
		// 时间格式化
      	dateFormat: function (row, column, cellValue, index){
          	return format(row[column.property])
      	}
	},
	created() {
		//this.findItems();
		this.$api.login.indexData().then((res) => {
				this.pageResult = {content:res.data}
      		})
	}
}
</script>

<style scoped>

</style>